package com.jx.lcs.customer.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.jx.lcs.employee.entity.Employee;
import com.jx.lcs.user.entity.UserInfo;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/** 
 * C端用户
 * @author Zhaoxb
 * @date 2015年8月12日
 */
@Entity
@Table(name = "tc_user")
@DynamicInsert
@DynamicUpdate
public class Customer implements java.io.Serializable {

	@Id
	@GenericGenerator(name = "idGenerator", strategy = "uuid")
	@GeneratedValue(generator = "idGenerator")
	@Column(name = "id", unique = true, nullable = false)
	private String id;
	 
	@Column(name = "uid")
	private String uid;
	
	@Column(name = "true_name")
	private String trueName;
	
	@Column(name = "user_tel")
	private String userTel;
	@Column(name = "pass_word")
	private String passWord;

	@Column(name = "deal_password")
	private String dealPassword;
	
	@Column(name = "sex")
	private String sex;
	
	@Column(name = "email")
	private String email;
	
	@Column(name = "brank_NO")
	private String brankNO;
	
	@Column(name = "id_card_NO")
	private String idCardNO;
	
	@Column(name = "user_type")
	private String userType;
	
	@Column(name = "img_url")
	private String imgUrl;
	
	@Column(name = "province")
	private String province;
	
	@Column(name = "city")
	private String city;

	@Column(name = "login_date")
	private Date loginDate;
	@Column(name = "out_date")
	private Date outDate;

	@Column(name = "identity_verify")
	private int identityVerify;
	@Column(name = "RECORDTIME")
	private Date recordTime;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "lcs_code", referencedColumnName="UID")
	@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
	private UserInfo userInfo;

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	public Date getRecordTime() {
		return recordTime;
	}

	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	public int getIdentityVerify() {

		return identityVerify;
	}

	public void setIdentityVerify(int identityVerify) {
		this.identityVerify = identityVerify;
	}

	public Date getOutDate() {
		return outDate;
	}

	public void setOutDate(Date outDate) {
		this.outDate = outDate;
	}

	public Date getLoginDate() {

		return loginDate;
	}

	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}

	public String getCity() {

		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getProvince() {

		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getImgUrl() {

		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getUserType() {

		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getIdCardNO() {
		return idCardNO;
	}

	public void setIdCardNO(String idCardNO) {
		this.idCardNO = idCardNO;
	}

	public String getBrankNO() {

		return brankNO;
	}

	public void setBrankNO(String brankNO) {
		this.brankNO = brankNO;
	}

	public String getEmail() {

		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getSex() {

		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getDealPassword() {

		return dealPassword;
	}

	public void setDealPassword(String dealPassword) {
		this.dealPassword = dealPassword;
	}

	public String getPassWord() {

		return passWord;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	public String getUserTel() {

		return userTel;
	}

	public void setUserTel(String userTel) {
		this.userTel = userTel;
	}

	public String getTrueName() {

		return trueName;
	}

	public void setTrueName(String trueName) {
		this.trueName = trueName;
	}

	public String getUid() {

		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getId() {

		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
